/////////////////////////////////////////////////
// Book of Angels
// (c) Copyright 2013 Edward Principe
// All Rights Reserved
////////////////////////////////////////////////
#ifndef SMTPTR_H
#define SMTPTR_H

#include <Windows.h>
#include <tchar.h>

////////////////////////////////////////////////
// SmtPtr: Smart pointer
////////////////////////////////////////////////
template<class T>
class SmtPtr
{
public: // Construction / Destruction
	SmtPtr()
	{
		_ptr = NULL;
		_ptr = new T;
	}

	~SmtPtr()
	{
		delete _ptr;
	}

public: // Methods
	T *Get() const {return _ptr;}

public: // Operators
	T *operator -> () {return _ptr;}
	T& operator * () {return *_ptr;}

private: // Attributes
	T *_ptr;
};
#endif